Solvers

Eigensolver

class qtealeaves.solvers.EigenSolverH(vec0, matvec_func, conv_params, args_func=None, kwargs_func=None, injected_funcs=None)[source]

Eigensolver for hermitian matrix.

Arguments

vec0 : vector to apply exponential matrix to / initial guess

matvec_func : callable, multiplies matrix in exponential with vector.

args_func : list, arguments for matvec_func

kwargs_func : dict, keyword arguments for matvec_func

injected_funcsNone or dictionary.

If data types are missing necessary attributes, e.g., real, we allow to inject them. Right now only for real. Key must be the attribute name to be replaces. Callable takes one argument being the obj.

abs(obj)[source]

Supporting taking the absolute value of any number via attribute or injected function.

init_basis()[source]

Initialize the basis and create diagonal / subdiagonal entries.

real(obj)[source]

Supporting taking the real part of complex number via attribute or injected function.

solve()[source]

Solver step executing iterations until new vector is returned.

Exponential of matrix

class qtealeaves.solvers.KrylovSolverH(vec0, prefactor, matvec_func, conv_params, args_func=[], kwargs_func={})[source]

Krylov solver for exponential of hermitian matrix.

Arguments

vec0 : vector to apply exponential matrix to.

prefactor : prefactor scalar in exponential

matvec_func : callable, multiplies matrix in exponential with vector.

conv_params : instance of TNConvergenceParameters.

args_func : list, arguments for matvec_func

kwargs_func : dict, keyword arguments for matvec_func

init_basis()[source]

Initialize the basis and create diagonal / subdiagonal entries.

solve()[source]

Sovler step executing iterations until new vector is returned.

class qtealeaves.solvers.KrylovSolverNH(vec0, prefactor, matvec_func, conv_params, args_func=[], kwargs_func={})[source]

Krylov solver for exponential of non-hermitian matrix.

Arguments

vec0 : vector to apply exponential matrix to.

prefactor : prefactor scalar in exponential

matvec_func : callable, multiplies matrix in exponential with vector.

args_func : list, arguments for matvec_func

kwargs_func : dict, keyword arguments for matvec_func

init_basis()[source]

Initialize the basis and create diagonal / subdiagonal entries.

solve()[source]

Solver step executing iterations until new vector is returned.